<template>
  <!-- 日期 范围-->
  <el-date-picker
    v-if="['DATE_RANGE', 'DATA_PICKER', 'DATE'].includes(props.columnData.fieldTypeCode)"
    v-model="props.itemData[props.columnData.fieldCode]"
    :type="date[props.columnData.fieldTypeGroup]"
    :disabled="props.columnData.disabled"
    placeholder="选择日期"
    value-format="YYYY-MM-DD"
    format="YYYY-MM-DD"
    range-separator="至"
    start-placeholder="开始日期"
    end-placeholder="结束日期"
    style="width: 100%"
    @change="handelChange"
    @blur="handelBlur"
  />
</template>

<script setup name="VinputNumber">
import { ref, reactive, computed } from 'vue'
import { mixinsData } from '../hooks/mixinsData'
const date = {
  DATE_RANGE: 'daterange',
  DATA_PICKER: 'date'
}
const props = defineProps({
  columnData: {
    type: Object,
    default: () => {}
  },
  itemData: {
    type: Object,
    default: () => {}
  },
  rules: {
    type: Object,
    default: () => {}
  }
})

const { handelBlur, handelChange } = mixinsData(props.columnData, props.itemData, props.rules)
</script>
<style lang="scss"></style>
